(function(angular) {
	'use strict';
	angular.module("fs.waf").factory("siteCurrencyCalendarService", siteCurrencyCalendarService);
	siteCurrencyCalendarService.$inject = [ '$q', 'loggerFactory', 'commonService', 'ajaxServiceFactory' ];
	function siteCurrencyCalendarService($q, loggerFactory, commonService, ajaxServiceFactory) {
		var log = loggerFactory.getLogger("siteCurrencyCalendarService"), ajaxService = ajaxServiceFactory.buildAjaxService({
			getCurrencyOptions : {
				url : 'do/cda/dataList/currencies',
				method : 'get'
			},
			getWeekendsOptions : {
				url : 'do/cda/dataList/weekends',
				method : 'get'
			},
		});
		
		
		function initOptions($scope, ctrl) {
			ajaxService.getCurrencyOptions().then(function(response) {
				ctrl.ccyOptions = response;
			}); 
			ajaxService.getWeekendsOptions().then(function(response) {
				ctrl.weekendsOptions = response ? response.data : [];
			});
			
		}
		
		return {
			initOptions : initOptions,
		};
	}
})(angular);